package com.ruoyi.project.ledger.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.ledger.mapper.LedgerFireFightingEquipmentManageMapper;
import com.ruoyi.project.ledger.domain.LedgerFireFightingEquipmentManage;
import com.ruoyi.project.ledger.service.ILedgerFireFightingEquipmentManageService;

/**
 * 消防设施设备管理台账Service业务层处理
 * 
 * @author gwc
 * @date 2020-04-14
 */
@Service
public class LedgerFireFightingEquipmentManageServiceImpl implements ILedgerFireFightingEquipmentManageService 
{
    @Autowired
    private LedgerFireFightingEquipmentManageMapper ledgerFireFightingEquipmentManageMapper;

    /**
     * 查询消防设施设备管理台账
     * 
     * @param id 消防设施设备管理台账ID
     * @return 消防设施设备管理台账
     */
    @Override
    public LedgerFireFightingEquipmentManage selectLedgerFireFightingEquipmentManageById(Long id)
    {
        return ledgerFireFightingEquipmentManageMapper.selectLedgerFireFightingEquipmentManageById(id);
    }

    /**
     * 查询消防设施设备管理台账列表
     * 
     * @param ledgerFireFightingEquipmentManage 消防设施设备管理台账
     * @return 消防设施设备管理台账
     */
    @Override
    public List<LedgerFireFightingEquipmentManage> selectLedgerFireFightingEquipmentManageList(LedgerFireFightingEquipmentManage ledgerFireFightingEquipmentManage)
    {
        return ledgerFireFightingEquipmentManageMapper.selectLedgerFireFightingEquipmentManageList(ledgerFireFightingEquipmentManage);
    }

    /**
     * 新增消防设施设备管理台账
     * 
     * @param ledgerFireFightingEquipmentManage 消防设施设备管理台账
     * @return 结果
     */
    @Override
    public int insertLedgerFireFightingEquipmentManage(LedgerFireFightingEquipmentManage ledgerFireFightingEquipmentManage)
    {
        ledgerFireFightingEquipmentManage.setCreateTime(DateUtils.getNowDate());
        return ledgerFireFightingEquipmentManageMapper.insertLedgerFireFightingEquipmentManage(ledgerFireFightingEquipmentManage);
    }

    /**
     * 修改消防设施设备管理台账
     * 
     * @param ledgerFireFightingEquipmentManage 消防设施设备管理台账
     * @return 结果
     */
    @Override
    public int updateLedgerFireFightingEquipmentManage(LedgerFireFightingEquipmentManage ledgerFireFightingEquipmentManage)
    {
        ledgerFireFightingEquipmentManage.setUpdateTime(DateUtils.getNowDate());
        return ledgerFireFightingEquipmentManageMapper.updateLedgerFireFightingEquipmentManage(ledgerFireFightingEquipmentManage);
    }

    /**
     * 批量删除消防设施设备管理台账
     * 
     * @param ids 需要删除的消防设施设备管理台账ID
     * @return 结果
     */
    @Override
    public int deleteLedgerFireFightingEquipmentManageByIds(Long[] ids)
    {
        return ledgerFireFightingEquipmentManageMapper.deleteLedgerFireFightingEquipmentManageByIds(ids);
    }

    /**
     * 删除消防设施设备管理台账信息
     * 
     * @param id 消防设施设备管理台账ID
     * @return 结果
     */
    @Override
    public int deleteLedgerFireFightingEquipmentManageById(Long id)
    {
        return ledgerFireFightingEquipmentManageMapper.deleteLedgerFireFightingEquipmentManageById(id);
    }
}
